package moc.egg;
import moc.compiler.*;
import moc.tds.*;
import moc.type.*;
import moc.gc.*;
import java.util.*;
import moc.type.object.*;
import mg.egg.eggc.runtime.libjava.lex.*;
import mg.egg.eggc.runtime.libjava.*;
import mg.egg.eggc.runtime.libjava.messages.*;
import mg.egg.eggc.runtime.libjava.problem.IProblem;
import java.util.Vector;
public class S_METHODES_MOC {
LEX_MOC scanner;
  S_METHODES_MOC() {
    }
  S_METHODES_MOC(LEX_MOC scanner, boolean eval) {
    this.scanner = scanner;
    this.att_eval = eval;
    this.att_scanner = scanner;
    }
int [] sync= new int[0];
  int att_cpt_meth;
  String att_myclass;
  boolean att_eval;
  String att_code;
  IMachine att_machine;
  int att_scpt_meth;
  TDS att_tds;
  LEX_MOC att_scanner;
  private void regle81() throws Exception {

    //declaration
    //appel
if  (att_eval)      action_code_81();
  }
  private void regle82() throws Exception {

    //declaration
    S_METHODE_MOC x_2 = new S_METHODE_MOC(scanner,att_eval) ;
    S_METHODES_MOC x_4 = new S_METHODES_MOC(scanner,att_eval) ;
    //appel
if  (att_eval)      action_auto_inh_82(x_2, x_4);
    x_2.analyser() ;
if  (att_eval)      action_desc_82(x_2, x_4);
    x_4.analyser() ;
if  (att_eval)      action_code_82(x_2, x_4);
  }
private void action_desc_82(S_METHODE_MOC x_2, S_METHODES_MOC x_4) throws Exception {
try {
// instructions
x_4.att_cpt_meth=this.att_cpt_meth+x_2.att_incr;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#desc","METHODES -> METHODE #desc METHODES1 #code ;"});
}
  }
private void action_code_81() throws Exception {
try {
// instructions
this.att_scpt_meth=this.att_cpt_meth;
this.att_code="";
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#code","METHODES -> #code ;"});
}
  }
private void action_auto_inh_82(S_METHODE_MOC x_2, S_METHODES_MOC x_4) throws Exception {
try {
// instructions
x_2.att_tds=this.att_tds;
x_4.att_tds=this.att_tds;
x_2.att_myclass=this.att_myclass;
x_4.att_myclass=this.att_myclass;
x_2.att_cpt_meth=this.att_cpt_meth;
x_2.att_machine=this.att_machine;
x_4.att_machine=this.att_machine;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#auto_inh","METHODES -> METHODE #desc METHODES1 #code ;"});
}
  }
private void action_code_82(S_METHODE_MOC x_2, S_METHODES_MOC x_4) throws Exception {
try {
// instructions
this.att_scpt_meth=x_4.att_scpt_meth;
this.att_code=x_2.att_code+x_4.att_code;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#code","METHODES -> METHODE #desc METHODES1 #code ;"});
}
  }
  public void analyser () throws Exception {
    scanner.lit ( 1 ) ;
    switch ( scanner.fenetre[0].code ) {
      case LEX_MOC.token_fin : // 268
        regle81 () ;
      break ;
      case LEX_MOC.token_plus : // 252
        regle82 () ;
      break ;
      case LEX_MOC.token_moins : // 253
        regle82 () ;
      break ;
      default :
               scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMOCMessages.id_MOC_unexpected_token,MOCMessages.MOC_unexpected_token,new String[]{scanner.fenetre[0].getNom()});
    }
  }
  }
